import {contractPendingList,contractProcessedList,modifyContractInformation,modifyContractState} from '../../api/api'

export default {
    state() {
        return {
            
        }
    },
    actions: {
        doGetContractPendingList(context, params) {
            return new Promise((resolve, reject) => {
                contractPendingList(params)
                .then(res => resolve(res))
                .catch(err => reject(err))
            })
        },
        doGetContractProcessedList(context, params) {
            return new Promise((resolve, reject) => {
                contractProcessedList(params)
                .then(res => resolve(res))
                .catch(err => reject(err))
            })
        },
        doModifyContractState(context,params) {
            return new Promise((resolve, reject) => {
                modifyContractState(params)
                .then(res => resolve(res))
                .catch(err => {
                    reject(err)
                } )
            })
        },
        doModifyContractInformation(context,params) {
            return new Promise((resolve, reject) => {
                modifyContractInformation(params)
                .then(res => resolve(res))
                .catch(err => {
                    reject(err)
                } )
            })
        },
        
    }
}